//
//  QRCodeInfo.m
//  gdemm
//
//  Created by 乔明超 on 16/4/14.
//  Copyright © 2016年 Goldencis. All rights reserved.
//

#import "QRCodeInfo.h"

@implementation QRCodeInfo
- (BOOL)quitQRisLegal:(QRCodeInfo *)info{
    if ([self isEqual:info]) {
        return NO;
    }
    
    if ([self.mUUID isEqualToString:@"all"] && [self.mLocation isEqualToString:info.mLocation] && [info.mQRStatus isEqualToString:QRSTATUS_OUT_TAG]) {
        return YES;
    }
    
    if ([self.mLocation isEqualToString:info.mLocation] && [self.mUUID isEqualToString:info.mUUID] && self.mDateTime < info.mDateTime && [info.mQRStatus isEqualToString:QRSTATUS_OUT_TAG]) {
        return YES;
    }
    
    return NO;
}


- (NSString *)description{

    return [NSString stringWithFormat:@" %@:%ld:%@:%@",_mLocation,_mDateTime,_mQRStatus,_mUUID];
}
@end
